package com.loubobooo.personal.blog.mapper.custom;

import com.loubobooo.personal.blog.entity.User;
import com.loubobooo.personal.blog.entity.vo.UserVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapperCustom {

    //获得用户列表
    public List<UserVO> listUser();

    // 登录验证
    public User selectLogin(@Param("userName") String userName, @Param("password") String password);

    //根据用户名或Email查用户数量
    public int getCountByNameOrEmail(@Param("userName") String userName, @Param("email") String email);

    //根据用户名或Email查用户
    public User getUserByNameOrEmail(@Param("userName") String userName, @Param("email") String email);

    //用户的文章数
    public Integer countArticleByUser(@Param(value = "id") Integer id);
}
